<?php
$user = $_POST['user'];
$admin = $_POST['admin'];
$conn = new mysqli("localhost", "root", "", "simple_weibo");
$conn->query("set names 'utf8'");

$sql = "DELETE FROM weibo_relation WHERE user='".$user."' and fans='".$admin."'";
$res = $conn->query($sql);

if($res){
    echo "成功取消关注";
}else {
    echo "取消关注失败";
}